package com.zhuang.chapter14.work02;

import java.util.Random;

public class MyArrayListTest {
	public static void main(String[] args) {
		MyArrayList<Integer> list = new MyArrayList<>();
		System.out.println("==========添加操作==========");
		list.add(getRandom());
		list.add(getRandom());
		list.add(getRandom());
		list.add(getRandom());
		list.add(getRandom());
		list.print();
		System.out.println("==========删除操作==========");
		list.remove(2);
		list.print();
	}

	public static int getRandom() {
		Random random = new Random();
		return random.nextInt(10);
	}
}
